# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=irctk
pkgver=1.1.0
pkgrel=0
pkgdesc="Extensible GUI IRC client written in Tcl/Tk"
url="https://lab.abiscuola.com/irctk/"
arch="all"
license="ISC"
depends="tk"
makedepends="curl-dev m4"
subpackages="
	$pkgname-doc
	$pkgname-transport-fossil
	"
source="https://lab.abiscuola.com/irctk/tarball/$pkgver/irctk-$pkgver.tar.gz"
options="!check" # no test suite

build() {
	PREFIX=/usr ./configure
	make

	cd transports/fossil
	PREFIX=/usr ./configure
	make
}

package() {
	make PREFIX="$pkgdir"/usr install
	mv -v "$pkgdir"/usr/man "$pkgdir"/usr/share/
	make -C transports/fossil DESTDIR="$pkgdir" install

	mkdir -vp "$pkgdir"/usr/share/irctk
	cp -vr extensions "$pkgdir"/usr/share/irctk/
	find "$pkgdir"/usr/share/irctk/extensions \
		-type f -name Makefile -delete
}

fossil() {
	pkgdesc="Fossil chat to IRC bridge"
	depends=

	amove usr/bin/ircfossil
}

sha512sums="
f64094e186a892985001ad9fdf53b1e4f2ade46d0d2b14c7f19c8fb9788de34a1d89de999b9304670754526a3842a9345474e06236f98223e8ea1ca411c23a93  irctk-1.1.0.tar.gz
"
